package com.baizhi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@Data
@TableName("cmfz_article")//上师文章表
public class CmfzArticle implements Serializable {
    /*CREATE TABLE `cmfz_article` (
            `article_id` int(100) NOT NULL AUTO_INCREMENT,
  `article_name` varchar(100) DEFAULT NULL,
  `article_image` varchar(200) DEFAULT NULL,
  `article_content` varchar(1000) DEFAULT NULL,
  `guru_id` int(100) DEFAULT NULL,
  `article_date` datetime DEFAULT NULL,*/
    @TableId(value = "article_id",type = IdType.AUTO)
    private Integer articleId;
    private String articleName;//文章名称
    private String articleImage;//文章保存路径
    private String articleContent;//文章内容
    private Integer guruId;//上师ID
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
    private Date articleDate;//上传时间
}
